package com.lanou3g.hw0420.socket;

import java.io.IOException;
import java.io.OutputStream;
import java.net.ServerSocket;
import java.net.Socket;

/**
 * Created by dllo on 18/4/21.
 */
public class Server {
    public static void main(String[] args) {
        try {
            ServerSocket ss =new ServerSocket(2333);
            while (true){
                Socket client=ss.accept();
                System.out.println("为了每一个客户介入:"+client.getRemoteSocketAddress());
                new EchoThread(client).start();
            }

        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
